/*
 * Copyright (c) 2003-2005
 * XDoclet Team
 * All rights reserved.
 */
package org.xdoclet.plugin.hibernate.pojo;

import java.util.Date;

/**
 * test pojo to test primitive properties and ID
 *
 * @hibernate.class table="component-table"
 */
public class ComponentMapping {
    /**
     * @hibernate.component prefix="p"
     */
    public AnotherClass classComponent;

    /**
     * @hibernate.component
     */
    public Simple field;

    /**
     * @hibernate.id generator-class="native"
     */
    private Long id;

    /**
     * @hibernate.component prefix="xpref_"
     */
    private WithManyToOne withManyToOne;

    /**
     * @hibernate.component class="org.xdoclet.plugin.hibernate.pojo.ComponentMapping$SimpleImpl" update="false" insert="true"
     * @hibernate.meta attribute="blurge" value="bang"
     */
    public Simple getComponent() {
        return field;
    }

    /**
     * @hibernate.component class="org.xdoclet.plugin.hibernate.pojo.ComponentMapping$SimpleImpl" prefix="prfx_"
     */
    public Simple getPrefixedComponent() {
        return field;
    }

    /**
     * @hibernate.property column="removed_dttm" not-null="true"
     */
    public Date getRemovedDttm() {
        return null;
    }

    public class AnotherClass {
        /**
         * @hibernate.property
         * @hibernate.column name="one"
         */
        private String stringField;
        

    }

    public class Simple {
        /**
         * @hibernate.parent
         */
        private ComponentMapping xyz;

        /**
         * @hibernate.property column="col" 
         */
        private String foo;
        /**
         * @hibernate.component prefix="nested_"
         */
        private Nested nested;
    }

    public class SimpleImpl extends Simple {
        /**
         * @hibernate.property
         */
        private String field;
    }

    public class Nested {
        /**
         * @hibernate.property column="col"
         */
        private String go;
    }

    public class WithManyToOne {
        /**
         * @hibernate.many-to-one column="refcol" foreign-key="glumn"
         */
        private Nested nested;
    }

    /**
     * @hibernate.component class="org.xdoclet.plugin.hibernate.pojo.ComponentMapping$ConcreteComponent"
     */
    public ComponentInterface getComponentInterface() {
        return null;
    }

    interface ComponentInterface {
    }

    class ConcreteComponent implements ComponentInterface {
        /**
         * @hibernate.property
         */
        public int getProperty() {
            return 0;
        }
    }
}